public class Array_02 {

    public static void main(String[] args) {
    int [] arr={17,25,9,46,689,2561,3};
    printArray(arr);

    }
//打印数组
    public  static void printArray(int[] arr){
        System.out.print("[");
        for (int i=0;i<arr.length;i++){
                if (i==arr.length-1){
                    System.out.print(arr[i]);
                }
                else
                {
                    System.out.print(arr[i]+",");
                }
        }
        System.out.println("]");
    }
}

